<template>
  <div id="app">
    
    
    <el-menu
      :default-active="activeIndex"
      class="el-menu-demo"
      mode="horizontal"
      @select="handleSelect"
    >
    <div id="logo">
      <el-image :src="require('@/assets/WebstormLogo.png')" alt="sorry" @error="imageError" onClick="logoFunction" />
    </div>
      <el-menu-item index="1"><el-link :underline=false href="/home">首页</el-link></el-menu-item>
      <el-submenu index="2">
        <template slot="title">视频</template>
        <el-menu-item index="2-1">数码测评</el-menu-item>
        <el-menu-item index="2-2">Vlog</el-menu-item>
        <el-menu-item index="2-3">Mac技巧</el-menu-item>
        <el-submenu index="2-4">
          <template slot="title">教程</template>
          <el-menu-item index="2-4-1">前端</el-menu-item>
          <el-menu-item index="2-4-2">Java</el-menu-item>
          <el-menu-item index="2-4-3">python</el-menu-item>
        </el-submenu>
      </el-submenu>
      <el-menu-item index="3">代码仓库</el-menu-item>
      <el-menu-item index="4">
        <!-- <router-link to="/About">关于</router-link> -->
        <el-link :underline=false href="/about">关于</el-link>
      </el-menu-item>
      <!--  -->
    </el-menu>
    <!-- <router-view></router-view> -->
    <div class="line"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      activeIndex: "1",
      activeIndex2: "1",
      
      url: '@/assets/WebstormLogo.png'
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};


</script>

<style>
/* #app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
} */
#logo
{
  width: 120px;
  height: 70px;
  /* display: inline; */
  float: left;
}
</style>
